
<%@page import="com.portlet.donggoi.model.quytrinhDG"%>
<%@page import="com.portlet.donggoi.service.quytrinhDGLocalServiceUtil"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@page import="java.util.*" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<portlet:defineObjects />

<h4>Quản lý nguyên liệu công ty AnhKhoa Brother</h4>

<%
	int count=quytrinhDGLocalServiceUtil.getquytrinhDGsCount();
	List<quytrinhDG>list=quytrinhDGLocalServiceUtil.getquytrinhDGs(0, count);
	if(list.size()>0){
%>
	<portlet:actionURL name="editQTDG" var="actionQTURL"></portlet:actionURL>
	<h4>Danh sach các quy trình</h4>
	<table border="1">
		<tr>
			<th>Mã quy trình đóng gói</th>
			<th>Ten quy trình</th>
			<th>Xóa</th>
		</tr>
		<%for (quytrinhDG l : list) { %>
		<tr>
			<td>
			<%
				String pk=String.valueOf(l.getMaQuyTrinhDG());
			%>
				<aui:form action="<%=actionQTURL.toString() %>" method="post">
					<aui:input type="hidden" name="maQT" id="maQT" value="<%=l.getMaQuyTrinhDG() %>"/>
					<aui:input type="submit" name="" value="<%=l.getMaQuyTrinhDG() %>" />
				</aui:form>
				
			</td>
			<td><%=l.getTenQuyTrinh()%></td>
			<td>
				<portlet:actionURL var="deleteURL" name="deleteQT">
					<portlet:param name="edit" value="<%=pk %>"/>
				</portlet:actionURL>
				<liferay-ui:icon-delete url="<%=deleteURL.toString() %>" />
			</td>
		</tr>
		<%} %>
	</table>
<%}else{ %>
	<h5>Khong co du lieu nao!!</h5>
<%} %>
<portlet:renderURL var="addQuyTrinh">
	<portlet:param name="mvcPath" value="/addQT.jsp"/>
</portlet:renderURL>
<portlet:renderURL var="viewCTQT">
	<portlet:param name="mvcPath" value="/viewCTQT.jsp"/>
</portlet:renderURL>
<p>
	<a href="<%=addQuyTrinh%>">Thêm quy trình</a><br>
	<a href="<%=viewCTQT%>">Chuyển trang chi tiết quy trình</a>
</p>